package com.ghpt.service.impl;
import com.ghpt.mapper.BeiYaShiMapper;
import com.ghpt.pojo.BeiYaShi;
import com.ghpt.service.BeiYaShiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BeiYaShiServiceImpl  implements BeiYaShiService {
    @Autowired
    private BeiYaShiMapper beiYaShiMapper;

    @Override
    public BeiYaShi findBeiYaShiById(Long id) {
        if (id != null) {
            return beiYaShiMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(BeiYaShi beiYaShi) {
        return beiYaShiMapper.updateById(beiYaShi);//更新成功为1否则为0
    }
}
